/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author FIRE
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PuOrderPreData extends BasicModel<PuOrderPreData> {
  pkCorp?: string; // 公司主键
  venId?: string; // 供应商ID
  busType?: string; // 业务流程
  wareId?: string; // 仓库ID
  cgId?: string; // 采购员人员ID
  cgName?: string; // 采购员名称
  orderCode?: string; // 订单号
  crowno?: string; // 订单行号
  invId?: string; // 存货ID
  createByName?: string; // 备货人名称
  selQty?: number; // 备货数量
  invalidDate?: string; // 失效时间
}

export const puOrderPreDataList = (params?: PuOrderPreData | any) =>
  defHttp.get<PuOrderPreData>({ url: adminPath + '/srm/asn/presh/puOrderPreData/list', params });

export const puOrderPreDataListData = (params?: PuOrderPreData | any) =>
  defHttp.post<Page<PuOrderPreData>>({ url: adminPath + '/srm/asn/presh/puOrderPreData/listData', params });

export const puOrderPreDataNeedShListData = (params?: PuOrderPreData | any) =>
  defHttp.post<Page<PuOrderPreData>>({ url: adminPath + '/srm/asn/presh/puOrderPreData/needShListData', params });

export const puOrderPreDataGroupListData = (params?: PuOrderPreData | any) =>
  defHttp.post<Page<PuOrderPreData>>({ url: adminPath + '/srm/asn/presh/puOrderPreData/groupListData', params });

export const puOrderPreDataForm = (params?: PuOrderPreData | any) =>
  defHttp.get<PuOrderPreData>({ url: adminPath + '/srm/asn/presh/puOrderPreData/form', params });

export const puOrderPreDataSave = (params?: any, data?: PuOrderPreData | any) =>
  defHttp.postJson<PuOrderPreData>({ url: adminPath + '/srm/asn/presh/puOrderPreData/save', params, data });

export const puOrderPreDataDelete = (params?: PuOrderPreData | any) =>
  defHttp.get<PuOrderPreData>({ url: adminPath + '/srm/asn/presh/puOrderPreData/delete', params });

export const puOrderPreDataPushAsn = (params?: PuOrderPreData | any) =>
  defHttp.get<PuOrderPreData>({ url: adminPath + '/srm/asn/presh/puOrderPreData/pushAsn', params });

